//
//  MKLunchManager.swift
//  MOKOAnnounce
//
//  Created by 曹相召 on 2017/7/17.
//  Copyright © 2017年 cc.moko. All rights reserved.
//

import UIKit

class MKLunchManager: NSObject {
    
    static let shared = MKLunchManager()

    //目前只有商家的界面
    func lunch(userType:MKUserType) -> Void {
        if(MKUser.shareUser.isLoginSuccess()){
            let tabbarVc:MKTabBarViewController = MKTabBarViewController()
            let appdelegate = UIApplication.shared.delegate as! AppDelegate
            appdelegate.window?.rootViewController = tabbarVc
        }else{
           print("未登录")
            let loginVc = MKLoginViewController()
            let appdelegate = UIApplication.shared.delegate as! AppDelegate
            appdelegate.window?.rootViewController = loginVc
        }
    }
}
